<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../header.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html>

<head>

	<script src="${path}/static/login/js/jquery.min.js?v=2.1.4"></script>
	<script src="${path}/static/login/js/bootstrap.min.js?v=3.3.5"></script>
	<%--<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
--%>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">


	<title></title>
	<meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
	<meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

	<link rel="shortcut icon" href="favicon.ico"> <link href="${path}/static/login/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
	<link href="${path}/static/login/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

	<link href="${path}/static/login/css/animate.min.css" rel="stylesheet">
	<link href="${path}/static/login/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
	<!--[if lt IE 8]>
	<meta http-equiv="refresh" content="0;ie.html" />
	<![endif]-->
	<%--<script>if(window.top !== window.self){ window.top.location = window.location;}</script>--%>
</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen  animated fadeInDown">
	<div>
		<div>

			<h1 class="logo-name">Hi !</h1>

		</div>
		<h3>欢迎使用</h3>

		<form class="m-t" role="form" action="index.html" id="login-form" method="post">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="用户名" required="" id="name" name="name" />
			</div>
			<div class="form-group">
				<input type="password" class="form-control" placeholder="密码" required="" id="password" name="password" />
			</div>
			<%--<div class="form-group">
				<input type="text" class="form-control" placeholder="验证码" required="" id="checkCode" name="checkCode" />
				&lt;%&ndash;验证码：<input type="text" name="checkCode"/>&ndash;%&gt;
				<img alt="" src="${path}/checkImg"><br/>
			</div>--%>
			<%--<div class="form-group">
				<input type="email" class="form-control" placeholder="验证码" required="">
				<img alt="" src="${path}/checkImg"><br/>
			</div>
--%>    </form>
		<button type="submit" onclick="submitForm()" class="btn btn-primary block full-width m-b">登 录</button>


		<p class="text-muted text-center">
			<a href="www.baidu.com<%--login.html#--%>"><small>忘记密码了？</small></a> | <a href="${path}/user/getRegisterPage">注册一个新账号</a>
		</p>


	</div>
</div>


	<script type="text/javascript">
		function submitForm() {
			//  正则表达式验证

			$.ajax({
				url : "${path}/user/login",
				type : "POST",
				dataType : "json",
				data : $("#login-form").serialize(),
				success : function(jsonResult) {
					if(jsonResult.ok) {
						window.location.href = "${path}/index";
					} else {
						alert(jsonResult.data);
					}
				}
			});
		}
	</script>

</body>

</html>